<template>
  <div id="display">
    <div v-for="(item, index) in products" :item="item" :key="index">
      <router-link
        :to="{
          name: 'detail',
          params: {
            id: item.id,
            name: item.name,
            price: item.price,
          },
        }"
      >
        <div class="ym">
          <img :src="item.img" alt="" />
          <h4>{{ item.name }}</h4>
          <br />
          <div class="a">
            <span class="count">{{ item.num }}</span
            ><span>折起</span>
          </div>
        </div>
      </router-link>
    </div>
        <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "advList",
  data() {
    return {
      products: [
        { id: 1, name: "太平鸟男女装专场",img: "https://h2.appsimg.com/a.appsimg.com/upload/brand/upcb/2022/04/23/198/ias_6a4fc2fd6736f36f4980382dc7e27f83_1135x545_85.jpg", },
        { id: 2, name: "卡宾Cabbeen男装专场",img: "https://h2.appsimg.com/a.appsimg.com/upload/brand/upcb/2022/04/23/198/ias_6a4fc2fd6736f36f4980382dc7e27f83_1135x545_85.jpg",},
        { id: 3, name: "诗凡黎SEIFINI女装专场",img: "https://h2.appsimg.com/a.appsimg.com/upload/brand/upcb/2022/04/23/198/ias_6a4fc2fd6736f36f4980382dc7e27f83_1135x545_85.jpg",},
      ],
    };
  },
};
</script>

<style scoped>
#display {
  background-color: #f9f9fa;
}
</style>